package ar.edu.unicen.pladema.ui.menu;

import org.eclipse.swt.custom.StackLayout;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Composite;

import ar.edu.unicen.pladema.ui.main.GrandPanel;

public class GoToMenuListener implements SelectionListener {
	private StackLayout stackLayout = null;
	private Composite composite = null;
	private GrandPanel gp = null;
	public GoToMenuListener(GrandPanel cp, StackLayout sl, Composite c) {
		this.stackLayout = sl;
		this.composite = c;
		this.gp = cp;
	}
	@Override
	public void widgetDefaultSelected(SelectionEvent e) {
		stackLayout.topControl = composite;
		gp.layout ();
		gp.showHint();
	}

	@Override
	public void widgetSelected(SelectionEvent e) {
		stackLayout.topControl = composite;
		gp.layout ();
		gp.showHint();
	}

}
